package com.niodata.dp.monitor.sharelib.entity.hadoop;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by ndp on 17-12-19.
 */
public class HdfsPerformance implements Serializable {

  private int id;
  private Date createTime;
  //"name": "Hadoop:service=NameNode,name=RpcActivityForPort9000"
  //rpc处理的平均时间
  private double rpcProcessingTimeAvgTime;
  //现在打开的链接数
  private int numOpenConnections;
  //rpc call 队列的长度
  private int callQueueLength;
  //"name": "Hadoop:service=NameNode,name=JvmMetrics"
  //堆内存使用监控
  private double memHeapUsedM;
  //正在执行的线程数量
  private int threadsRunnable;
  //线程阻塞数量
  private int threadsBlocked;
  //线程等待数量
  private int threadsWaiting;
  private int threadsTimedWaiting;
  private int threadsTerminated;
  //"name": "Hadoop:service=NameNode,name=RpcDetailedActivityForPort9000"
  //每秒获取block的数量
  private int getBlocksNumOps;
  //获取一个block的平均时间
  private double getBlocksAvgTime;
  //每秒添加block数量
  private int addBlockNumOps;
  //添加一个block的平均时间
  private double addBlocksAvgTime;

  public double getRpcProcessingTimeAvgTime() {
    return rpcProcessingTimeAvgTime;
  }

  public void setRpcProcessingTimeAvgTime(double rpcProcessingTimeAvgTime) {
    this.rpcProcessingTimeAvgTime = rpcProcessingTimeAvgTime;
  }

  public int getNumOpenConnections() {
    return numOpenConnections;
  }

  public void setNumOpenConnections(int numOpenConnections) {
    this.numOpenConnections = numOpenConnections;
  }

  public int getCallQueueLength() {
    return callQueueLength;
  }

  public void setCallQueueLength(int callQueueLength) {
    this.callQueueLength = callQueueLength;
  }

  public double getMemHeapUsedM() {
    return memHeapUsedM;
  }

  public void setMemHeapUsedM(double memHeapUsedM) {
    this.memHeapUsedM = memHeapUsedM;
  }

  public int getThreadsRunnable() {
    return threadsRunnable;
  }

  public void setThreadsRunnable(int threadsRunnable) {
    this.threadsRunnable = threadsRunnable;
  }

  public int getThreadsBlocked() {
    return threadsBlocked;
  }

  public void setThreadsBlocked(int threadsBlocked) {
    this.threadsBlocked = threadsBlocked;
  }

  public int getThreadsWaiting() {
    return threadsWaiting;
  }

  public void setThreadsWaiting(int threadsWaiting) {
    this.threadsWaiting = threadsWaiting;
  }

  public int getThreadsTimedWaiting() {
    return threadsTimedWaiting;
  }

  public void setThreadsTimedWaiting(int threadsTimedWaiting) {
    this.threadsTimedWaiting = threadsTimedWaiting;
  }

  public int getThreadsTerminated() {
    return threadsTerminated;
  }

  public void setThreadsTerminated(int threadsTerminated) {
    this.threadsTerminated = threadsTerminated;
  }

  public int getGetBlocksNumOps() {
    return getBlocksNumOps;
  }

  public void setGetBlocksNumOps(int getBlocksNumOps) {
    this.getBlocksNumOps = getBlocksNumOps;
  }

  public double getGetBlocksAvgTime() {
    return getBlocksAvgTime;
  }

  public void setGetBlocksAvgTime(double getBlocksAvgTime) {
    this.getBlocksAvgTime = getBlocksAvgTime;
  }

  public int getAddBlockNumOps() {
    return addBlockNumOps;
  }

  public void setAddBlockNumOps(int addBlockNumOps) {
    this.addBlockNumOps = addBlockNumOps;
  }

  public double getAddBlocksAvgTime() {
    return addBlocksAvgTime;
  }

  public void setAddBlocksAvgTime(double addBlocksAvgTime) {
    this.addBlocksAvgTime = addBlocksAvgTime;
  }

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public Date getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }
}
